<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>LCOV - code analysis - /usr/include/c++/5/stdexcept</title>
  <link rel="stylesheet" type="text/css" href="../../../../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LCOV - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../../../../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
          <tr>
            <td width="10%" class="headerItem">Current view:</td>
            <td width="35%" class="headerValue"><a href="../../../../index.html">top level</a> - <a href="index.html">usr/include/c++/5</a> - stdexcept<span style="font-size: 80%;"> (source / <a href="stdexcept.func-sort-c.html">functions</a>)</span></td>
            <td width="5%"></td>
            <td width="15%"></td>
            <td width="10%" class="headerCovTableHead">Hit</td>
            <td width="10%" class="headerCovTableHead">Total</td>
            <td width="15%" class="headerCovTableHead">Coverage</td>
          </tr>
          <tr>
            <td class="headerItem">Test:</td>
            <td class="headerValue">code analysis</td>
            <td></td>
            <td class="headerItem">Lines:</td>
            <td class="headerCovTableEntry">0</td>
            <td class="headerCovTableEntry">7</td>
            <td class="headerCovTableEntryLo">0.0 %</td>
          </tr>
          <tr>
            <td class="headerItem">Date:</td>
            <td class="headerValue">2020-09-11 22:50:33</td>
            <td></td>
            <td class="headerItem">Functions:</td>
            <td class="headerCovTableEntry">0</td>
            <td class="headerCovTableEntry">0</td>
            <td class="headerCovTableEntryHi">-</td>
          </tr>
          <tr>
            <td class="headerItem">Legend:</td>
            <td class="headerValueLeg">            Lines:
            <span class="coverLegendCov">hit</span>
            <span class="coverLegendNoCov">not hit</span>
</td>
            <td></td>
          </tr>
          <tr><td><img src="../../../../glass.png" width=3 height=3 alt=""></td></tr>
        </table>
      </td>
    </tr>

    <tr><td class="ruler"><img src="../../../../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td>
<pre class="sourceHeading">          Line data    Source code</pre>
<pre class="source">
<a name="1"><span class="lineNum">       1 </span>            : // Standard exception classes  -*- C++ -*-</a>
<span class="lineNum">       2 </span>            : 
<span class="lineNum">       3 </span>            : // Copyright (C) 2001-2015 Free Software Foundation, Inc.
<span class="lineNum">       4 </span>            : //
<span class="lineNum">       5 </span>            : // This file is part of the GNU ISO C++ Library.  This library is free
<span class="lineNum">       6 </span>            : // software; you can redistribute it and/or modify it under the
<span class="lineNum">       7 </span>            : // terms of the GNU General Public License as published by the
<span class="lineNum">       8 </span>            : // Free Software Foundation; either version 3, or (at your option)
<span class="lineNum">       9 </span>            : // any later version.
<span class="lineNum">      10 </span>            : 
<span class="lineNum">      11 </span>            : // This library is distributed in the hope that it will be useful,
<span class="lineNum">      12 </span>            : // but WITHOUT ANY WARRANTY; without even the implied warranty of
<span class="lineNum">      13 </span>            : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
<span class="lineNum">      14 </span>            : // GNU General Public License for more details.
<span class="lineNum">      15 </span>            : 
<span class="lineNum">      16 </span>            : // Under Section 7 of GPL version 3, you are granted additional
<span class="lineNum">      17 </span>            : // permissions described in the GCC Runtime Library Exception, version
<span class="lineNum">      18 </span>            : // 3.1, as published by the Free Software Foundation.
<span class="lineNum">      19 </span>            : 
<span class="lineNum">      20 </span>            : // You should have received a copy of the GNU General Public License and
<span class="lineNum">      21 </span>            : // a copy of the GCC Runtime Library Exception along with this program;
<span class="lineNum">      22 </span>            : // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
<span class="lineNum">      23 </span>            : // &lt;http://www.gnu.org/licenses/&gt;.
<span class="lineNum">      24 </span>            : 
<span class="lineNum">      25 </span>            : /** @file include/stdexcept
<span class="lineNum">      26 </span>            :  *  This is a Standard C++ Library header.
<span class="lineNum">      27 </span>            :  */
<span class="lineNum">      28 </span>            : 
<span class="lineNum">      29 </span>            : //
<span class="lineNum">      30 </span>            : // ISO C++ 19.1  Exception classes
<span class="lineNum">      31 </span>            : //
<span class="lineNum">      32 </span>            : 
<span class="lineNum">      33 </span>            : #ifndef _GLIBCXX_STDEXCEPT
<span class="lineNum">      34 </span>            : #define _GLIBCXX_STDEXCEPT 1
<span class="lineNum">      35 </span>            : 
<span class="lineNum">      36 </span>            : #pragma GCC system_header
<span class="lineNum">      37 </span>            : 
<span class="lineNum">      38 </span>            : #include &lt;exception&gt;
<span class="lineNum">      39 </span>            : #include &lt;string&gt;
<span class="lineNum">      40 </span>            : 
<span class="lineNum">      41 </span>            : namespace std _GLIBCXX_VISIBILITY(default)
<span class="lineNum">      42 </span>            : {
<span class="lineNum">      43 </span>            : _GLIBCXX_BEGIN_NAMESPACE_VERSION
<span class="lineNum">      44 </span>            : 
<span class="lineNum">      45 </span>            : #if _GLIBCXX_USE_DUAL_ABI
<span class="lineNum">      46 </span>            : #if _GLIBCXX_USE_CXX11_ABI
<span class="lineNum">      47 </span>            :   // Emulates an old COW string when the new std::string is in use.
<span class="lineNum">      48 </span>            :   struct __cow_string
<span class="lineNum">      49 </span>            :   {
<span class="lineNum">      50 </span>            :     union {
<span class="lineNum">      51 </span>            :       const char* _M_p;
<span class="lineNum">      52 </span>            :       char _M_bytes[sizeof(const char*)];
<span class="lineNum">      53 </span>            :     };
<span class="lineNum">      54 </span>            : 
<span class="lineNum">      55 </span>            :     __cow_string();
<span class="lineNum">      56 </span>            :     __cow_string(const std::string&amp;);
<span class="lineNum">      57 </span>            :     __cow_string(const char*, size_t);
<span class="lineNum">      58 </span>            :     __cow_string(const __cow_string&amp;) _GLIBCXX_USE_NOEXCEPT;
<span class="lineNum">      59 </span>            :     __cow_string&amp; operator=(const __cow_string&amp;) _GLIBCXX_USE_NOEXCEPT;
<span class="lineNum">      60 </span>            :     ~__cow_string();
<span class="lineNum">      61 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">      62 </span>            :     __cow_string(__cow_string&amp;&amp;) noexcept;
<span class="lineNum">      63 </span>            :     __cow_string&amp; operator=(__cow_string&amp;&amp;) noexcept;
<span class="lineNum">      64 </span>            : #endif
<span class="lineNum">      65 </span>            :   };
<span class="lineNum">      66 </span>            : 
<span class="lineNum">      67 </span>            :   typedef basic_string&lt;char&gt; __sso_string;
<span class="lineNum">      68 </span>            : #else // _GLIBCXX_USE_CXX11_ABI
<span class="lineNum">      69 </span>            :   typedef basic_string&lt;char&gt; __cow_string;
<span class="lineNum">      70 </span>            : 
<span class="lineNum">      71 </span>            :   // Emulates a new SSO string when the old std::string is in use.
<span class="lineNum">      72 </span>            :   struct __sso_string
<span class="lineNum">      73 </span>            :   {
<span class="lineNum">      74 </span>            :     struct __str
<span class="lineNum">      75 </span>            :     {
<span class="lineNum">      76 </span>            :       const char* _M_p;
<span class="lineNum">      77 </span>            :       size_t _M_string_length;
<span class="lineNum">      78 </span>            :       char _M_local_buf[16];
<span class="lineNum">      79 </span>            :     };
<span class="lineNum">      80 </span>            : 
<span class="lineNum">      81 </span>            :     union {
<span class="lineNum">      82 </span>            :       __str _M_s;
<span class="lineNum">      83 </span>            :       char _M_bytes[sizeof(__str)];
<span class="lineNum">      84 </span>            :     };
<span class="lineNum">      85 </span>            : 
<span class="lineNum">      86 </span>            :     __sso_string() _GLIBCXX_USE_NOEXCEPT;
<span class="lineNum">      87 </span>            :     __sso_string(const std::string&amp;);
<span class="lineNum">      88 </span>            :     __sso_string(const char*, size_t);
<span class="lineNum">      89 </span>            :     __sso_string(const __sso_string&amp;);
<span class="lineNum">      90 </span>            :     __sso_string&amp; operator=(const __sso_string&amp;);
<span class="lineNum">      91 </span>            :     ~__sso_string();
<span class="lineNum">      92 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">      93 </span>            :     __sso_string(__sso_string&amp;&amp;) noexcept;
<span class="lineNum">      94 </span>            :     __sso_string&amp; operator=(__sso_string&amp;&amp;) noexcept;
<span class="lineNum">      95 </span>            : #endif
<span class="lineNum">      96 </span>            :   };
<span class="lineNum">      97 </span>            : #endif // _GLIBCXX_USE_CXX11_ABI
<span class="lineNum">      98 </span>            : #else  // _GLIBCXX_USE_DUAL_ABI
<span class="lineNum">      99 </span>            :   typedef basic_string&lt;char&gt; __sso_string;
<span class="lineNum">     100 </span>            :   typedef basic_string&lt;char&gt; __cow_string;
<span class="lineNum">     101 </span>            : #endif
<span class="lineNum">     102 </span>            : 
<span class="lineNum">     103 </span>            :   /**
<span class="lineNum">     104 </span>            :    * @addtogroup exceptions
<span class="lineNum">     105 </span>            :    * @{
<span class="lineNum">     106 </span>            :    */
<span class="lineNum">     107 </span>            : 
<span class="lineNum">     108 </span>            :   /** Logic errors represent problems in the internal logic of a program;
<span class="lineNum">     109 </span>            :    *  in theory, these are preventable, and even detectable before the
<span class="lineNum">     110 </span>            :    *  program runs (e.g., violations of class invariants).
<span class="lineNum">     111 </span>            :    *  @brief One of two subclasses of exception.
<span class="lineNum">     112 </span>            :    */
<span class="lineNum">     113 </span>            :   class logic_error : public exception 
<span class="lineNum">     114 </span>            :   {
<span class="lineNum">     115 </span>            :     __cow_string _M_msg;
<span class="lineNum">     116 </span>            : 
<span class="lineNum">     117 </span>            :   public:
<span class="lineNum">     118 </span>            :     /** Takes a character string describing the error.  */
<span class="lineNum">     119 </span>            :     explicit 
<span class="lineNum">     120 </span>            :     logic_error(const string&amp; __arg);
<span class="lineNum">     121 </span>            : 
<span class="lineNum">     122 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">     123 </span>            :     explicit
<span class="lineNum">     124 </span>            :     logic_error(const char*);
<span class="lineNum">     125 </span>            : #endif
<span class="lineNum">     126 </span>            : 
<span class="lineNum">     127 </span>            : #if _GLIBCXX_USE_CXX11_ABI || _GLIBCXX_DEFINE_STDEXCEPT_COPY_OPS
<span class="lineNum">     128 </span>            :     logic_error(const logic_error&amp;) _GLIBCXX_USE_NOEXCEPT;
<span class="lineNum">     129 </span>            :     logic_error&amp; operator=(const logic_error&amp;) _GLIBCXX_USE_NOEXCEPT;
<span class="lineNum">     130 </span>            : #endif
<span class="lineNum">     131 </span>            : 
<span class="lineNum">     132 </span>            :     virtual ~logic_error() _GLIBCXX_USE_NOEXCEPT;
<span class="lineNum">     133 </span>            : 
<span class="lineNum">     134 </span>            :     /** Returns a C-style character string describing the general cause of
<span class="lineNum">     135 </span>            :      *  the current error (the same string passed to the ctor).  */
<span class="lineNum">     136 </span>            :     virtual const char* 
<span class="lineNum">     137 </span>            :     what() const _GLIBCXX_USE_NOEXCEPT;
<span class="lineNum">     138 </span>            :   };
<span class="lineNum">     139 </span>            : 
<span class="lineNum">     140 </span>            :   /** Thrown by the library, or by you, to report domain errors (domain in
<span class="lineNum">     141 </span>            :    *  the mathematical sense).  */
<span class="lineNum">     142 </span><span class="lineNoCov">          0 :   class domain_error : public logic_error </span>
<span class="lineNum">     143 </span>            :   {
<span class="lineNum">     144 </span>            :   public:
<span class="lineNum">     145 </span>            :     explicit domain_error(const string&amp; __arg);
<span class="lineNum">     146 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">     147 </span>            :     explicit domain_error(const char*);
<span class="lineNum">     148 </span>            : #endif
<span class="lineNum">     149 </span>            :     virtual ~domain_error() _GLIBCXX_USE_NOEXCEPT;
<span class="lineNum">     150 </span>            :   };
<span class="lineNum">     151 </span>            : 
<span class="lineNum">     152 </span>            :   /** Thrown to report invalid arguments to functions.  */
<span class="lineNum">     153 </span><span class="lineNoCov">          0 :   class invalid_argument : public logic_error </span>
<span class="lineNum">     154 </span>            :   {
<span class="lineNum">     155 </span>            :   public:
<span class="lineNum">     156 </span>            :     explicit invalid_argument(const string&amp; __arg);
<span class="lineNum">     157 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">     158 </span>            :     explicit invalid_argument(const char*);
<span class="lineNum">     159 </span>            : #endif
<span class="lineNum">     160 </span>            :     virtual ~invalid_argument() _GLIBCXX_USE_NOEXCEPT;
<span class="lineNum">     161 </span>            :   };
<span class="lineNum">     162 </span>            : 
<span class="lineNum">     163 </span>            :   /** Thrown when an object is constructed that would exceed its maximum
<span class="lineNum">     164 </span>            :    *  permitted size (e.g., a basic_string instance).  */
<span class="lineNum">     165 </span><span class="lineNoCov">          0 :   class length_error : public logic_error </span>
<span class="lineNum">     166 </span>            :   {
<span class="lineNum">     167 </span>            :   public:
<span class="lineNum">     168 </span>            :     explicit length_error(const string&amp; __arg);
<span class="lineNum">     169 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">     170 </span>            :     explicit length_error(const char*);
<span class="lineNum">     171 </span>            : #endif
<span class="lineNum">     172 </span>            :     virtual ~length_error() _GLIBCXX_USE_NOEXCEPT;
<span class="lineNum">     173 </span>            :   };
<span class="lineNum">     174 </span>            : 
<span class="lineNum">     175 </span>            :   /** This represents an argument whose value is not within the expected
<span class="lineNum">     176 </span>            :    *  range (e.g., boundary checks in basic_string).  */
<span class="lineNum">     177 </span><span class="lineNoCov">          0 :   class out_of_range : public logic_error </span>
<span class="lineNum">     178 </span>            :   {
<span class="lineNum">     179 </span>            :   public:
<span class="lineNum">     180 </span>            :     explicit out_of_range(const string&amp; __arg);
<span class="lineNum">     181 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">     182 </span>            :     explicit out_of_range(const char*);
<span class="lineNum">     183 </span>            : #endif
<span class="lineNum">     184 </span>            :     virtual ~out_of_range() _GLIBCXX_USE_NOEXCEPT;
<span class="lineNum">     185 </span>            :   };
<span class="lineNum">     186 </span>            : 
<span class="lineNum">     187 </span>            :   /** Runtime errors represent problems outside the scope of a program;
<span class="lineNum">     188 </span>            :    *  they cannot be easily predicted and can generally only be caught as
<span class="lineNum">     189 </span>            :    *  the program executes.
<span class="lineNum">     190 </span>            :    *  @brief One of two subclasses of exception.
<span class="lineNum">     191 </span>            :    */
<span class="lineNum">     192 </span>            :   class runtime_error : public exception 
<span class="lineNum">     193 </span>            :   {
<span class="lineNum">     194 </span>            :     __cow_string _M_msg;
<span class="lineNum">     195 </span>            : 
<span class="lineNum">     196 </span>            :   public:
<span class="lineNum">     197 </span>            :     /** Takes a character string describing the error.  */
<span class="lineNum">     198 </span>            :     explicit 
<span class="lineNum">     199 </span>            :     runtime_error(const string&amp; __arg);
<span class="lineNum">     200 </span>            : 
<span class="lineNum">     201 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">     202 </span>            :     explicit
<span class="lineNum">     203 </span>            :     runtime_error(const char*);
<span class="lineNum">     204 </span>            : #endif
<span class="lineNum">     205 </span>            : 
<span class="lineNum">     206 </span>            : #if _GLIBCXX_USE_CXX11_ABI || _GLIBCXX_DEFINE_STDEXCEPT_COPY_OPS
<span class="lineNum">     207 </span>            :     runtime_error(const runtime_error&amp;) _GLIBCXX_USE_NOEXCEPT;
<span class="lineNum">     208 </span>            :     runtime_error&amp; operator=(const runtime_error&amp;) _GLIBCXX_USE_NOEXCEPT;
<span class="lineNum">     209 </span>            : #endif
<span class="lineNum">     210 </span>            : 
<span class="lineNum">     211 </span>            :     virtual ~runtime_error() _GLIBCXX_USE_NOEXCEPT;
<span class="lineNum">     212 </span>            : 
<span class="lineNum">     213 </span>            :     /** Returns a C-style character string describing the general cause of
<span class="lineNum">     214 </span>            :      *  the current error (the same string passed to the ctor).  */
<span class="lineNum">     215 </span>            :     virtual const char* 
<span class="lineNum">     216 </span>            :     what() const _GLIBCXX_USE_NOEXCEPT;
<span class="lineNum">     217 </span>            :   };
<span class="lineNum">     218 </span>            : 
<span class="lineNum">     219 </span>            :   /** Thrown to indicate range errors in internal computations.  */
<span class="lineNum">     220 </span><span class="lineNoCov">          0 :   class range_error : public runtime_error </span>
<span class="lineNum">     221 </span>            :   {
<span class="lineNum">     222 </span>            :   public:
<span class="lineNum">     223 </span>            :     explicit range_error(const string&amp; __arg);
<span class="lineNum">     224 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">     225 </span>            :     explicit range_error(const char*);
<span class="lineNum">     226 </span>            : #endif
<span class="lineNum">     227 </span>            :     virtual ~range_error() _GLIBCXX_USE_NOEXCEPT;
<span class="lineNum">     228 </span>            :   };
<span class="lineNum">     229 </span>            : 
<span class="lineNum">     230 </span>            :   /** Thrown to indicate arithmetic overflow.  */
<span class="lineNum">     231 </span><span class="lineNoCov">          0 :   class overflow_error : public runtime_error </span>
<span class="lineNum">     232 </span>            :   {
<span class="lineNum">     233 </span>            :   public:
<span class="lineNum">     234 </span>            :     explicit overflow_error(const string&amp; __arg);
<span class="lineNum">     235 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">     236 </span>            :     explicit overflow_error(const char*);
<span class="lineNum">     237 </span>            : #endif
<span class="lineNum">     238 </span>            :     virtual ~overflow_error() _GLIBCXX_USE_NOEXCEPT;
<span class="lineNum">     239 </span>            :   };
<span class="lineNum">     240 </span>            : 
<span class="lineNum">     241 </span>            :   /** Thrown to indicate arithmetic underflow.  */
<span class="lineNum">     242 </span><span class="lineNoCov">          0 :   class underflow_error : public runtime_error </span>
<span class="lineNum">     243 </span>            :   {
<span class="lineNum">     244 </span>            :   public:
<span class="lineNum">     245 </span>            :     explicit underflow_error(const string&amp; __arg);
<span class="lineNum">     246 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">     247 </span>            :     explicit underflow_error(const char*);
<span class="lineNum">     248 </span>            : #endif
<span class="lineNum">     249 </span>            :     virtual ~underflow_error() _GLIBCXX_USE_NOEXCEPT;
<span class="lineNum">     250 </span>            :   };
<span class="lineNum">     251 </span>            : 
<span class="lineNum">     252 </span>            :   // @} group exceptions
<span class="lineNum">     253 </span>            : 
<span class="lineNum">     254 </span>            : _GLIBCXX_END_NAMESPACE_VERSION
<span class="lineNum">     255 </span>            : } // namespace
<span class="lineNum">     256 </span>            : 
<span class="lineNum">     257 </span>            : #endif /* _GLIBCXX_STDEXCEPT */
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="ruler"><img src="../../../../glass.png" width=3 height=3 alt=""></td></tr>
    <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.12</a></td></tr>
  </table>
  <br>

</body>
</html>
